<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div style='width:600px;height:400px'></div>
  <script src='https://cdnjs.cloudflare.com/ajax/libs/echarts/4.8.0/echarts.min.js'></script>
  <script>
    //随着时间的变化趋势
    var xDataArr = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
    var yDataArr = [3000, 4000, 5000, 2000, 1000, 600, 500, 1300, 1500, 1400, 0, 0]
    var mycharts = echarts.init(document.querySelector('div'))
    var option = {
      title: {
        text: '年度出货量',
        textStyle: {
          color: 'black'
        }
      },
      xAxis: {
        type: 'category',
        data: xDataArr,
      },
      yAxis: {
        type: 'value',
      },
      series: [
        {
          name: '康师傅方便面',
          type: 'line',
          data: yDataArr,
        }
      ],
    }
    mycharts.setOption(option)
  </script>
</body>

</html>